package boot

import (
	"github.com/gogf/gf/os/gview"
	"myblog/app/controller/system/siteconfig"
	"myblog/app/service/module/category"
	shopService "myblog/app/service/module/shop"
	"myblog/app/service/system/config"
	"myblog/app/service/system/dict"
	"myblog/app/service/system/permission"
)

func init() {
	gview.Instance().BindFuncMap(gview.FuncMap{
		"hasPermi":          permission.HasPermi,
		"getPermiButton":    permission.GetPermiButton,
		"getDictLabel":      dict.GetDictLabel,
		"getDictTypeSelect": dict.GetDictTypeSelect,
		"getDictTypeRadio":  dict.GetDictTypeRadio,
		"getDictTypeData":   dict.GetDictTypeData,
		"ossUrl":            config.GetOssUrl,
		"catelist":          category.Catelist,
		"ischecked":         shopService.IsValueInList,
		"getsiteconfig":     siteconfig.GetValueByName,
	})
}
